package com.charger.cooperation.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.charger.cooperation.mapper.ProjectsMapper;
import com.charger.cooperation.domain.Projects;
import com.charger.cooperation.service.IProjectsService;

/**
 * 加盟项目Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-23
 */
@Service
public class ProjectsServiceImpl implements IProjectsService 
{
    @Autowired
    private ProjectsMapper projectsMapper;

    /**
     * 查询加盟项目
     * 
     * @param projectsId 加盟项目主键
     * @return 加盟项目
     */
    @Override
    public Projects selectProjectsByProjectsId(Long projectsId)
    {
        return projectsMapper.selectProjectsByProjectsId(projectsId);
    }

    /**
     * 查询加盟项目列表
     * 
     * @param projects 加盟项目
     * @return 加盟项目
     */
    @Override
    public List<Projects> selectProjectsList(Projects projects)
    {
        return projectsMapper.selectProjectsList(projects);
    }

    /**
     * 新增加盟项目
     * 
     * @param projects 加盟项目
     * @return 结果
     */
    @Override
    public int insertProjects(Projects projects)
    {
        return projectsMapper.insertProjects(projects);
    }

    /**
     * 修改加盟项目
     * 
     * @param projects 加盟项目
     * @return 结果
     */
    @Override
    public int updateProjects(Projects projects)
    {
        return projectsMapper.updateProjects(projects);
    }

    /**
     * 批量删除加盟项目
     * 
     * @param projectsIds 需要删除的加盟项目主键
     * @return 结果
     */
    @Override
    public int deleteProjectsByProjectsIds(Long[] projectsIds)
    {
        return projectsMapper.deleteProjectsByProjectsIds(projectsIds);
    }

    /**
     * 删除加盟项目信息
     * 
     * @param projectsId 加盟项目主键
     * @return 结果
     */
    @Override
    public int deleteProjectsByProjectsId(Long projectsId)
    {
        return projectsMapper.deleteProjectsByProjectsId(projectsId);
    }

    @Override
    public List<Projects> selectById(Long Id) {
        return projectsMapper.selectById(Id);
    }

    @Override
    public List<Projects> getUnrelatedChargerList(Projects projects) {
        return projectsMapper.getUnrelatedChargerList(projects);
    }
}
